#! /usr/bin/python
# coding: utf-8

from Tkinter import *

root = Tk()

lb = Listbox(root)
sl = Scrollbar(root)
sl.pack(side=RIGHT, fill=Y)

lb['yscrollcommand']=sl.set

for i in range(100):
    lb.insert(END, str(i))

lb.pack(side=LEFT)

sl['command']=lb.yview

root.mainloop()
